import {
    DatabaseOutlined,
    DockerOutlined,
    HomeOutlined,
    TeamOutlined,
    UnlockOutlined,
    UserOutlined
} from "@ant-design/icons";
import Home from "../pages/home/Home";
import Role from "../pages/permission/Role";
import User from "../pages/user/User";
import Personal from "../pages/personal/Personal";
import Error from "../pages/error/Error";
import Permission from "../pages/permission/Permission";
import UserDetails from "../pages/user/UserDetails";
import Configuration from "../pages/nacos/Configuration";
import ServiceInstance from "../pages/nacos/ServiceInstance";

/**
 * 网站菜单定义
 *
 * key: 唯一标识, 也是路由地址
 * label: 选项名称
 * icon: 选项图标
 * routeElement: 路由组件
 * isShow: 是否显示
 */
const Menus = [
    {
        key: "/index",
        label: "首页",
        icon: <HomeOutlined/>,
        routeElement: <Home/>,
        isShow: true
    },

    // ===================== 权限管理路由 =====================
    {
        key: "/role",
        label: "权限管理",
        icon: <UnlockOutlined/>,
        routeElement: <Role/>,
        isShow: true
    },
    // 权限绑定页面
    {
        key: "/permission/:roleId",
        routeElement: <Permission/>,
        isShow: false
    },

    // ===================== 用户管理路由 =====================
    {
        key: '/user',
        label: "用户管理",
        icon: <TeamOutlined/>,
        routeElement: <User/>,
        isShow: true
    },
    {
        key: "/user/:operation/:userId",
        routeElement: <UserDetails/>,
        isShow: false
    },

    // ===================== 服务治理路由 =====================
    {
        key: '/configuration',
        label: "配置管理",
        icon: <DatabaseOutlined/>,
        routeElement: <Configuration/>,
        isShow: true
    },
    {
        key: '/serviceInstance',
        label: "服务实例",
        icon: <DockerOutlined/>,
        routeElement: <ServiceInstance/>,
        isShow: true
    },

    {
        key: '/personal',
        label: "个人中心",
        icon: <UserOutlined/>,
        routeElement: <Personal/>,
        isShow: true
    }, {
        key: '*',
        label: "404页面",
        routeElement: <Error/>,
        isShow: false
    }
];

export default Menus;